<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                }
            }
            function closeThisWindow(rtnflag) {
                if (rtnflag == "true") {
                    window.returnValue = "1";
                    window.close();
                }
            }
        </script>
        <style type="text/css">
            .col-1 {
                width: 87%;
            }

            .col-2 {
                width: 13%;
            }
        </style>
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView id="tabview" dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                <p:tab title="卡复核启用">
                    <h:form id="form">
                        <p:messages id="msgs" showDetail="false"/>
                        <p:panel style="margin-top:10px" id="panel">
                            <h:panelGrid columns="2" cellspacing="5" columnClasses="col-1,col-2" style="text-align: right;">
                                <h:panelGrid columns="4" cellspacing="5" style="text-align: right;">
                                    <h:outputLabel value="卡号:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.cardno}" readonly="true" disabled="true" size="27"/>
                                    <h:outputLabel value="证件种类:"/>
                                    <h:selectOneMenu value="#{cdtCardAction.cdtcard.idtype}" disabled="true">
                                        <f:selectItems value="#{cdtCardAction.certificateOptions}"/>
                                    </h:selectOneMenu>
                                    <h:outputLabel value="持卡人证件号:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.idno}" size="27"
                                                 maxlength="18" disabled="true"/>
                                    <h:outputLabel value="持卡人姓名:"/>
                                    <p:inputText disabled="true" value="#{cdtCardAction.cdtcard.name}" size="27"
                                                 maxlength="60" />
                                    <h:outputLabel value="发卡日期:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.opendate}" readonly="true" disabled="true" size="27"/>
                                    <h:outputLabel value="预存金额:"/>
                                    <p:inputText disabled="true" value="#{cdtCardAction.cdtcard.openamt}" size="27"
                                                 maxlength="17" />
                                    <h:outputLabel value="地址:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.addr}" size="27" maxlength="80" disabled="true"/>
                                    <h:outputLabel value="邮编:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.zipnum}" size="27" maxlength="6" disabled="true"/>
                                    <h:outputLabel value="移动电话:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.mobile}" size="27" maxlength="11" disabled="true"/>
                                    <h:outputLabel value="固定电话:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.telnum}" size="27" maxlength="20" disabled="true"/>
                                    <h:outputLabel value="电子邮箱:"/>
                                    <p:inputText value="#{cdtCardAction.cdtcard.email}" size="27" maxlength="40" disabled="true"/>

                                </h:panelGrid>
                                <h:panelGrid style="text-align: right;">
                                    <p:commandButton id="refuseBtn" value="启用" style="width:90px; align:right"
                                                     action="#{cdtCardAction.onCheck}"
                                                     update="form,msgs">
                                    </p:commandButton>
                                </h:panelGrid>
                            </h:panelGrid>
                        </p:panel>
                        <h:outputText id="jscript" escape="false" value="#{cdtCardAction.jscript}"/>
                    </h:form>
                </p:tab>
            </p:tabView>
        </div>
    </ui:define>
</ui:composition>